//
//  PhotoBrowserViewController.swift
//  weibo
//
//  Created by yellow on 15/10/29.
//  Copyright © 2015年 yellow. All rights reserved.
//

import UIKit

/// 图片查看控制器，主体界面就是底部左右2个按钮：关闭，保存(原图)
class PhotoBrowserViewController: UIViewController {
    
<<<<<<< HEAD
    /// 选择的图片的indexPath
    var selectedIndexPath:NSIndexPath
    // 配图url集合
    var photoURLS:[NSURL]
    
    init(selectedIndexPath:NSIndexPath,photoURLS:[NSURL]){
        self.selectedIndexPath = selectedIndexPath
        self.photoURLS = photoURLS
        print("\(self.selectedIndexPath)\n"+"\(self.photoURLS)")
=======
    /// 接收需要显示的图片组info
    var photoInfoDict:[String:AnyObject]
    
    init(photoInfoDict:[String:AnyObject]){
        self.photoInfoDict = photoInfoDict
        print(photoInfoDict)
>>>>>>> 118ca216dc87274a8bb57ab1f83f49fa257469d4
        super.init(nibName: nil, bundle: nil)
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    //懒加载
    
    /// 关闭按钮
    private var closeBtn:UIButton = {
        let btn = UIButton()
        btn.setTitle("关闭", forState: UIControlState.Normal)
        btn.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)
        btn.backgroundColor = UIColor.darkGrayColor()
        btn.titleLabel?.font = UIFont.systemFontOfSize(18)
        btn.sizeToFit()
        return btn
    }()
}

extension PhotoBrowserViewController{

/// 界面初始化
    private func setUI(){
        view.backgroundColor = UIColor.blackColor()
        
        view.addSubview(closeBtn)
        
        closeBtn.snp_makeConstraints { (make) -> Void in
            make.left.equalTo(self.view.snp_left)
        }
    }
}
